package com.woniu.woniuk16.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private Integer code;
    private String message;
    private Object object;

    public static Result getInstance(Object o){
        Result result = new Result();
        result.setCode(20000);
        result.setMessage("正常");
        result.setObject(o);
        return result;
    }

    public Result setCode(Integer code){
        this.code=code;
        return this;
    }

    public Result setMessage(String message){
        this.message = message;
        return this;
    }

    public Result setObject(Object o){
        this.object = o;
        return this;
    }
}
